package com.lovo.service.impl;

import com.lovo.dao.IUserDAO;
import com.lovo.model.UserDO;
import com.lovo.service.IUserService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * Description:
 *
 * @author LiuChengQi
 * @date Created on 2020/11/18
 */
@Service
public class UserService implements IUserService {
    @Resource
    private IUserDAO dao;

    @Override
    public void register(UserDO userDO) {
         dao.save(userDO);
    }

    @Override
    public UserDO login(String userName, String pwd) {
        return dao.findByUserNameAndPassword(userName, pwd);
    }
}
